package cn.v2tila.rsosa.management.controller;

import cn.v2tila.rsosa.management.entity.MgtPermissionEntity;
import cn.v2tila.rsosa.management.service.MgtPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 权限控制器
 *
 * @author v2tila on 21:42 2019/2/5
 */

@RestController
@RequestMapping(value = "auth")
public class authController {
    @Autowired
    private MgtPermissionService mgtPermissionService;

    @RequestMapping(value = "getUserPerms")
    public List<MgtPermissionEntity> findAllPerms(){
        return mgtPermissionService.findAll();
    }
}
